package com.study.结构型模式.外观模式;

public class Popcorn {

    private Popcorn(){}

    private static final class Instance{
        public static final Popcorn instance = new Popcorn();
    }

    public static Popcorn getInstance(){
        return Instance.instance;
    }

    public void on(){
        System.out.println("popcorn on");
    }

    public void off(){
        System.out.println("popcorn off");
    }

    public void pop(){
        System.out.println("popcorn is popping");
    }
}
